package com.nstar.jianli.vo
{
	public class JianLiVO
	{
		public var id:String;//此ID援引微博ID
		public var name:String;
		
		public var linkNumber:String;
		public var mail:String;
		public var remarks:String;
		
		
		public var start:String;
		public var end:String;
		public var company:String;
		public var jobs:String;
		public var projectDesc:String;
		public var position:String;
		public var styleName:String;
		public var strokeColor:uint;
		public var startDate:Date;
		public var endDate:Date;
		public var backgroundColor:uint;
		public var resumeType:String = WORK_RESUME;
		
		public static const WORK_RESUME:String = "work";
		public static const EDU_RESUME:String = "education";
		
		public function JianLiVO()
		{
		}
		
		//简单的信息，职位及公司
		public function get simpleDesc():String{
			return jobs+"\n"+company;
		}
		//获取起始日期的年份
		public function get startYear():int{
			return int(start.split("-")[0]);
		}
		//获取起始日期的月份
		public function get startMonth():int{
			return int(start.split("-")[1]);
		}
		

		//获取结束日期的年份
		public function get endYear():int{
			return int(end.split("-")[0]);
		}
		
		//获取结束日期的月份
		public function get endMonth():int{
			return int(end.split("-")[1]);
		}
		
		//获取两个日期之间的月份数
		public function getMonthDiff():int{
			return Math.abs(endYear-startYear)*12+Math.abs(endMonth-startMonth);
		}

		public function toString():String{
			return "id="+id+",name："+name+",company："+company+",jobs："+jobs;
		}

	}
}